package br.com.findimoveis.infra;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import br.com.findimoveis.constants.TipoEstado;
import br.com.findimoveis.constants.TipoImovel;
import br.com.findimoveis.constants.TipoPesquisa;

/**
 * @author soliva
 *
 */
public class InicializaAplicacao implements ServletContextListener {

	@Override
	public void contextDestroyed(ServletContextEvent servletContextEvent) {
		// TODO Auto-generated method stub

	}

	@Override
	public void contextInitialized(ServletContextEvent servletContextEvent) {
		ServletContext servletContext = servletContextEvent.getServletContext();
	 	servletContext.setAttribute("tipoImoveis", TipoImovel.values());
	 	servletContext.setAttribute("tipoEstados", TipoEstado.values());
	 	servletContext.setAttribute("tipoPesquisas", TipoPesquisa.values());
			
	}

}
